package com.mirana.module.common.model.dictpm;

import com.mirana.frame.base.model.BaseModel;
import com.mirana.frame.db.base.anno.ColumnPlus;
import com.mirana.frame.db.base.anno.FKPlus;
import com.mirana.frame.db.base.anno.Notes;
import com.mirana.frame.db.base.anno.TablePlus;
import lombok.Data;

import java.util.Date;

@Data
@Notes("商机表")
@TablePlus(name = "dict_business")
public class DictBusiness extends BaseModel {

    @Notes("商机名称")
    @ColumnPlus(default_val = "''", length = "20")
    private String business_name;

    @Notes("商机介绍")
    @ColumnPlus(default_val = "''", length = "200")
    private String business_introduce;

    @Notes("所属行业，字典 dict2_industry")
    @ColumnPlus(length = "2")
    private int industry;

    @Notes("所属类别（一级），area_info")
    @ColumnPlus(length = "10")
    private int province;

    @Notes("所属地市（二级），area_info")
    @ColumnPlus(length = "10")
    private int city;

    @Notes("所属区县（三级），area_info")
    @ColumnPlus(length = "10")
    private int county;

    @Notes("客户id，外键")
    @ColumnPlus()
    @FKPlus(tableClass = DictCustomer.class)
    private Long customer_id;

    @Notes("客户名称")
    @ColumnPlus(default_val = "''", length = "20")
    private String customer_name;

    @Notes("客户经理")
    @ColumnPlus(default_val = "''", length = "20")
    private String customer_manager;

    @Notes("发布人")
    @ColumnPlus(default_val = "''", length = "20")
    private String publish_user;

    @Notes("发布时间")
    @ColumnPlus()
    private Date publish_time;

    @Notes("数据来源，默认1。1人工编写，2接口")
    @ColumnPlus(default_val = "1", length = "2")
    private int datasource;

//    @Notes("商机所属阶段，字典 dict2_business_step")
//    @ColumnPlus(length = "1")
//    private int business_step;

    @Notes("状态，默认1。1进行中，2转为项目，3失败归档")
    @ColumnPlus(default_val = "1", length = "1")
    private int business_state;

    @Notes("指派给xxid")
    @ColumnPlus()
    private int assign_user_id;

    @Notes("指派给xx姓名")
    @ColumnPlus(default_val = "''", length = "20")
    private String assign_user_name;

    @Notes("指派给xx说明")
    @ColumnPlus(default_val = "''", length = "200")
    private String assign_explain;

    @Notes("是否失败归档。0：正常，1：失败归档")
    @ColumnPlus(default_val = "0", length = "1")
    private int fail_flag;

    @Notes("是否转换为项目。0：未转换，1：已转换")
    @ColumnPlus(default_val = "0", length = "1")
    private int convert_flag;

    @Notes("是否已投标。0：未投标，1：已投标")
    @ColumnPlus(default_val = "0", length = "1")
    private int tender_flag;

}
